package com.subang.function.domain;

import com.subang.common.annotation.Excel;
import com.subang.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 申论试卷对象 shenlun_papers
 * 
 * @author subei
 * @date 2025-02-26
 */
public class ShenlunPapers extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private String id;

    /** 试卷名称 */
    @Excel(name = "试卷名称")
    private String name;

    /** 试卷省份 */
    @Excel(name = "试卷省份")
    private String category;

    @Excel(name = "年份")
    private String year;


    /** 满分 */
    @Excel(name = "满分")
    private Long fullMark;

    /** 问题列表 */
    @Excel(name = "问题列表")
    private String questionIds;

    /** 问题数组 */
    @Excel(name = "问题数组")
    private List<Question> questions;



    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setCategory(String category) 
    {
        this.category = category;
    }

    public String getCategory() 
    {
        return category;
    }
    public void setFullMark(Long fullMark) 
    {
        this.fullMark = fullMark;
    }

    public Long getFullMark() 
    {
        return fullMark;
    }
    public void setQuestionIds(String questionIds) 
    {
        this.questionIds = questionIds;
    }

    public String getQuestionIds() 
    {
        return questionIds;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("category", getCategory())
            .append("year", getYear())
            .append("fullMark", getFullMark())
            .append("questionIds", getQuestionIds())
            .append("questions", getQuestions())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }

    public List<Question> getQuestions() {
        return questions;
    }

    public void setQuestions(List<Question> questions) {
        this.questions = questions;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    // Question 类的定义
    public static class Question extends ShenlunQuestions {
        private String description; // 问题描述
        private Long sequence;//题目顺序
        private Long score; // 分数
        private List<Answer> answers; // 答案数组

        // Getter 和 Setter 方法
        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public Long getScore() {
            return score;
        }

        public void setScore(Long score) {
            this.score = score;
        }

        public Long getSequence() { return sequence;}


        public void setSequence(Long sequence) {this.sequence = sequence;}

        @Override
        public List<Answer> getAnswers() {
            return answers;
        }

        @Override
        public void setAnswers(List<Answer> answers) {
            this.answers = answers;
        }
    }

    // Answer 类的定义
    public static class Answer extends ShenlunReferenceAnswers {
        private String content; // 答案内容
        private String source; // 答案来源

        // Getter 和 Setter 方法
        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getSource() {
            return source;
        }

        public void setSource(String source) {
            this.source = source;
        }
    }
}
